package model

import "gorm.io/gorm"

type LoginUser struct {
	gorm.Model
	Username string `gorm:"type:varchar(30)"`
	Password string `gorm:"type:varchar(50)"`
}

type User struct {
	gorm.Model
	Username string `gorm:"type:varchar(30)"`
	Tel      string `gorm:"type:varchar(30)"`
	NikeName string `gorm:"type:varchar(30)"`
	Email    string `gorm:"type:varchar(30)"`
	Role     string `gorm:"type:varchar(30)"`
}

type UserRole struct {
	gorm.Model
	Uid int `gorm:"type:int"`
	Rid int `gorm:"type:int"`
}

type Role struct {
	gorm.Model
	Uid      int    `gorm:"type:int"`
	RoleName string `gorm:"type:varchar(30)"`
}

type RoleNode struct {
	gorm.Model
	Rid int `gorm:"type:int"`
	Nid int `gorm:"type:int"`
}

type Node struct {
	gorm.Model
	NodeType string `gorm:"type:varchar(30)"`
	NodeName string `gorm:"type:varchar(30)"`
}
